#pragma once
#include "stdafx.h"
#include "pixelStorage.h"

class PixelCalcBase {
protected:
	double area, diameter, perimeter, Ru, enclosingSize, ratioCircle, ratioRect,
			solidity, hullArea, getMoments[7];
	bool closed;
	Moments m;
	vector<Point> approx;
	vector<vector<int> > hull;
	vector<vector<Vec4i> > defects;
	Rect rect;
	Point2f center;
	float radius;

public:
	PixelCalcBase() {};
	PixelCalcBase(PixelStorage &pS);
	~PixelCalcBase();

	void minMaxHue(PixelStorage &pS, int i, int j);
	void loadImage(Mat image);

	void contours(PixelStorage &pS);
	void drawTrueContours(PixelStorage &pS);

	void raster(PixelStorage &pS);
	void calcTrueContours(PixelStorage &pS);
};
